<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<f:view>

    <h:messages errorClass="error" layout="table" style="width: 100%"/>

    <p>用户注册</p>

    <h:form id="userRegisteForm">
        <h:inputHidden value="#{userRegisteForm.userId}">
            <f:convertNumber/>
        </h:inputHidden>
        <h:panelGrid columns="3" styleClass="detail" columnClasses="label">

                                          用户名：
            <h:inputText value="#{userRegisteForm.user.username}" id="username"/>
            <h:message for="username" styleClass="errorMessage"/>

           	密码：
            <h:inputText value="#{userRegisteForm.user.password}" id="password"/>
            <h:message for="password" styleClass="errorMessage"/>

                                          昵称：
            <h:inputText value="#{userRegisteForm.user.usernamecn}" id="usernamecn"/>
            <h:message for="usernamecn" styleClass="errorMessage"/>

            二级密码：
            <h:inputText value="#{userRegisteForm.user.passwordl2}" id="passwordl2" required="true"/>
            <h:message for="passwordl2" styleClass="errorMessage"/>

           Email:
            <h:inputText value="#{userRegisteForm.user.email}" id="email"/>
            <h:message for="email" styleClass="errorMessage"/>

           Phone:
            <h:inputText value="#{userRegisteForm.user.phone}" id="phone"/>
            <h:message for="phone" styleClass="errorMessage"/>

            <h:panelGroup>
                <h:commandButton value="Save" action="#{userRegisteForm.registeUserAction}" id="save" styleClass="button"/>
                <h:commandButton value="Cancel" action="cancel" immediate="true" id="cancel" styleClass="button"/>
            </h:panelGroup>
        </h:panelGrid>
    </h:form>

</f:view>
</html>